<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>

    <script type="text/javascript" src="js/axios.js"></script>
    <script type="text/javascript">
        axios.defaults.baseURL = 'http://localhost:3000';

        // 让里面的异步请求按顺序执行
        async function queryData() {
            var info = await axios.get('async1');
            console.log(info.data);
            var ret = await axios.get('async2?info=' + info.data);
            console.log(ret.data);

        }

        queryData()
    </script>
</body>

</html>